package com.cssw.fyzb.core.dao.exchange;

import com.cssw.fyzb.core.model.dodb.GExchangeFLog;
import com.cssw.fyzb.core.model.dodb.YExchangeFLog;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.util.Date;

@Repository
public class GExchangeFLogDaoImpl implements GExchangeFLogDao{
    @Override
    public Long updateData(Long userId, BigDecimal g_coin, BigDecimal f_coin){
        GExchangeFLog gExchangeFLog =new GExchangeFLog();
        gExchangeFLog.setUserId(userId);
        gExchangeFLog.setGCoin(g_coin);
        gExchangeFLog.setFCoin(f_coin);
        Date now = new Date();
        gExchangeFLog.setCreateTime(now);
        gExchangeFLog.save();
        return  gExchangeFLog.getLogId();
    }
}
